<?php
$a=array('name'=>'李田野','学号'=>'243110317','age'=>'19','电话'=>'18337011627');
for($i=0;$i<6;++$i){//    for循环无法正确显示数组中各个元素的值
    echo $i,'.',$a[$i],"\n";
}
//使用foreach来遍历数组元素
echo "显示数组各个元素key及value的值";
foreach ($a as $k=>$v){
    echo $k,':',$v,"\n";
}
echo "仅仅显示value的值: \n";
foreach ($a as $value){
    echo $value,"\n";
}